<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <!--头部固定引用-->
    <meta charset="utf-8">
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../css/icon-font.css"/><!--图标-->
    <!--固定引用结束,自定义引用添加在下面-->
    <title>JT2</title>
    <!--页面样式添加在这里，多看看base。css里面的公共样式，大部分常用的都有，避免使用独立css文件为单独页面设置样式，避免随意添加样式到公共样式-->
    <style>
        .user-pubAlertDetail-title {
            color: rgba(34, 34, 34, 1);
            line-height: 0.44rem;
            margin-right: 0.32rem;
            word-break: break-word;
        }

        .user-pubAlertDetail-detail {
            color: rgba(34, 34, 34, 0.7);
            line-height: 0.48rem;
            margin-top: 0.24rem;
        }

        .user-pubAlertDetail-pubAlert {
            margin: 0.32rem 0.32rem 0.6rem 0.32rem;
        }

        .user-pubAlertDetail-total {
            border-top: rgba(244, 244, 244, 1) 1px solid;
        }
    </style>
</head>
<!--尽量不要在body上添加样式，除了背景色-->
<body>
<div class="flex-column ff400 h-100-p">
    <!--头部部分-->
    <div class="placeholder-top">
        <!--状态栏-->
        <div class="bg-main status-bar"></div>
        <!--导航栏-->
        <div class="bg-main nav-bar flex-row justify-content-between c-white align-items-center">
            <div class="left-bar" onclick="clickBack()">
                <span class="iconfont iconfanhui1 fs16"></span>
            </div>
            <div class="flex-row center-bar fs16 ff500 flex-1">公告详情</div>
            <div class="right-bar">
            </div>
        </div>
    </div>
    <!--功能模块-->
    <div class="user-pubAlertDetail-total bg-white">
        <div class="user-pubAlertDetail-pubAlert">
            <!--公告标题-->
            <div class="user-pubAlertDetail-title fs16 ff500 flex-wrap"></div>
            <!--公告详情-->
            <div class="user-pubAlertDetail-detail fs13 ff400"></div>
        </div>
    </div>
</div>
<!--具体代码-->
</body>
<!--下面四个文件为固定引用，自己根据情况调整路径，不要跟换引入顺序，其他引用添加在后面-->
<script src="../../js/dict.js"></script>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/checkJsBridge.js"></script>
<script src="../../js/utils.js"></script>
<!--固定引用结束-->
<script src="../../js/api.js"></script>
<!--避免一个页面包含过多功能，减少js重绘页面，推荐分功能，分页面-->
<script>
    let pm = {
      noticeId: '',
      pubAlertDetail: '',
      pubAlertTitle: ''
    }

    /*固定页面初始化方法，用于替代$(function(){}),param为url参数，Object类型*/
    function initPage(params) {
      //状态栏自适应
      Utils.sbhAdaptive()
      pm.noticeId = params.noticeId
      addDetail(params.noticeId)
    }

    /*页面所在窗口由后台前台时触发的方法,param为url参数，Object类型*/
    function startPage(params) {
      addDetail(pm.noticeId)
    }

    function reLoadPage() {
      addDetail(pm.noticeId)
    }

    //写入公告标题与详情
    function addDetail(noticeId) {
      Server.noticeDetail.getAppShowSysNotice({noticeId: noticeId}).then(
        function (data) {
          let reg = /[;；]/g
          let pubAlertDetail = data.msgConnect.replace(reg, '；<br>')
          let pubAlertTitle = data.title
          $('.user-pubAlertDetail-detail').html(pubAlertDetail)
          $('.user-pubAlertDetail-title').html(pubAlertTitle)
        }
      ).catch(jsBridge.log)
    }

</script>
</html>